package cn.xd.base.application.service.query;

import cn.xd.base.application.dto.query.AdminUserQuery;
import cn.xd.base.domain.bean.response.AdminOrgDTO;
import cn.xd.base.domain.bean.response.AdminUserDTO;
import cn.xd.base.domain.bean.response.AdminUserDetailDTO;
import cn.xd.base.domain.bean.response.AdminUserForLoginDTO;
import cn.xd.core.response.ObjectResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

public interface AdminUserQueryAppService {

    List<Long> getRoleIds(Long userId, List<Long> orgIds);

    Page<AdminUserDTO> getPage(AdminUserQuery query, List<Long> orgIds);

    List<AdminUserDTO> getList(AdminUserQuery query, List<Long> orgIds);

    List<Long> getOrgIdsByAdminUserId(Long id);

    List<AdminOrgDTO> getOrgsByAdminUserId(Long id);

    /**
     * 账号查询所属机构
     *
     * @param account
     * @return
     */
    List<AdminOrgDTO> getOrgByAccount(String account);


    Boolean checkHasAccount(String account, Long id);

    Boolean checkHasGlobalUser(Long account, Long id);

    Long getAdminUserIdByGlobalUserId(Long globalUserId);

    /**
     * id获取用户信息
     *
     * @param id
     * @return
     */
    AdminUserDetailDTO getInfo(Long id);

    /**
     * 账号获取登录信息
     *
     * @param account
     * @param org
     * @return
     */
    ObjectResult<AdminUserForLoginDTO> getInfoByAccount(String account, Long org);

}
